<template>
	<view>
		<lcw-nav-bar>地址选择</lcw-nav-bar>
		<view class="">{{ JSON.stringify(address) }}</view>
		<button @tap="setSelectAddress">选择地址</button>
		<lcw-select-address
			ref="lcwAddressRef"
			:address="address"
			@change="change"
		></lcw-select-address>
	</view>
</template>

<script>
export default {
	data() {
		return {
			address: { province: '', city: '', area: '', street: '' }
		};
	},
	methods: {
		change(value) {
			console.log(value);
			this.address = value;
		},
		setSelectAddress() {
			this.$refs.lcwAddressRef.open();
		}
	}
};
</script>

<style></style>
